package com.corpgovernment.organization.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import com.corpgovernment.common.handler.Sm4TypeHandler;
import com.corpgovernment.organization.enumm.BgUserEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;


/**
 *
 **/
@EqualsAndHashCode(callSuper = false)
@Data
@Table(name = "mb_user_login")
public class MbUserLogin extends BaseEntity {

    /**
     * 账号
     **/
    @Column(name = "account_name")
    @OperateLogFieldDesc(value = "账号")
    private String accountName;
    /**
     * 员工工号
     **/
    @Column(name = "uid")
    @OperateLogFieldDesc(value = "员工工号")
    private String uid;
    /**
     * 密码
     **/
    @Column(name = "pwd")
    @OperateLogFieldDesc(value = "密码")
    private String pwd;
    /**
     * 用户名
     */
    @Column(name = "user_name")
    @OperateLogFieldDesc(value = "用户名")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String userName;
    /**
     * 是否为后台用户 1:后台用户 0:前台用户
     */
    @Column(name = "bg_user")
    @OperateLogFieldDesc(value = "是否为后台用户", type = BgUserEnum.class)
    private Integer bgUser;
    /**
     * 国家码
     **/
    @Column(name = "country_code")
    @OperateLogFieldDesc(value = "国家码")
    private String countryCode;
    /**
     * 手机号
     **/
    @Column(name = "phone_num")
    @OperateLogFieldDesc(value = "手机号")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String phoneNum;
    /**
     * 邮箱
     **/
    @Column(name = "email")
    @OperateLogFieldDesc(value = "邮箱")
    private String email;
    /**
     * 账号状态1:启用0:禁用
     */
    @Column(name = "status")
    @OperateLogFieldDesc(value = "账号状态")
    private Integer status;
    /**
     * 修改密码时间
     **/
    @Column(name = "set_password_time")
    private Date setPasswordTime;
    /**
     * 删除时间，1970-01-01 08:00:00.000代表未删除
     **/
    @Column(name = "delete_time")
    private Date deleteTime;
}
